<div class="Head">
    <h2>
        <div class="fl"><h1 class="normal"><?php echo "Search Result"; ?></h1></div>
        
    </h2>
</div>
<div class="Middle">
<?php include_partial('list', array('articles' => $pager->getResults(),'limit' => $limit)); ?>
<?php if ($pager->haveToPaginate()): ?>
<div class="pagination">
    <a href="<?php echo url_for('@search?keyword='.$keyword) ?>&page=1">
            <img src="/sfPropelPlugin/images/first.png" alt="First page" border="0" />
    </a>
    <a href="<?php echo url_for('@search?keyword='.$keyword) ?>&page=<?php echo $pager->getPreviousPage() ?>">
        <img src="/sfPropelPlugin/images/previous.png" alt="Previous page" title="Previous page" border="0" />
    </a>
<?php foreach ($pager->getLinks() as $page): ?>
    <?php if ($page == $pager->getPage()): ?>
        <?php echo $page ?>
    <?php else: ?>
        <a href="<?php echo url_for('@search?keyword='.$keyword) ?>&page=<?php echo $page ?>"><?php echo $page ?></a>
    <?php endif; ?>
<?php endforeach; ?>
    <a href="<?php echo url_for('@search?keyword='.$keyword) ?>&page=<?php echo $pager->getNextPage() ?>">
        <img src="/sfPropelPlugin/images/next.png" alt="Next page" title="Next page" border="0" />
    </a>
    <a href="<?php echo url_for('@search?keyword='.$keyword) ?>&page=<?php echo $pager->getLastPage() ?>">
        <img src="/sfPropelPlugin/images/last.png" alt="Last page" title="Last page" border="0" />
    </a>
</div>
<?php endif; ?>
<div class="pagination_desc">
    <strong><?php echo count($pager) ?></strong> articles
    <?php if ($pager->haveToPaginate()): ?>
    - page <strong><?php echo $pager->getPage() ?>/<?php echo $pager->getLastPage() ?></strong>
    <?php endif; ?>
</div>
</div>